import request from './request'

export default {
    // 账号登录
    loginByAccount(data) {
        return request.post('/auth/login', JSON.stringify(data), {
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },

    // 短信登录
    loginBySms(data) {
        return request.post('/auth/sms-login', data)
    },

    // 注册
    register(data) {
        return request.post('/auth/register', data)
    },

    // 发送验证码
    sendSmsCode(phone, type) {
        return request.post('/sms/send', { phone, type })
    }
}